<%@page contentType="text/html;charset=UTF-8"%>
<%@page pageEncoding="UTF-8"%>
<%@ page session="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<html>
<head>
	<META http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Event view</title>
	<link rel="stylesheet" href="<c:url value="/resources/blueprint/screen.css" />" type="text/css" media="screen, projection">
	<link rel="stylesheet" href="<c:url value="/resources/blueprint/print.css" />" type="text/css" media="print">
	<!--[if lt IE 8]>
		<link rel="stylesheet" href="<c:url value="/resources/blueprint/ie.css" />" type="text/css" media="screen, projection">
	<![endif]-->
</head>	
<body>
<div class="container">




	<h1>
		View Match
	</h1>
	<div class="span-12 last">	
	<table>
	<tr>
	<td> Match No
	</td>
	<td>Match Location
	</td>	
	<td>Match Time
	</td>
	 <td>Event
	</td>
	<td> Match Opponent 1
	</td>
	<td>Match Opponent 1 Pts
	</td>	
	<td>Match Opponent 2
	</td>
	 <td>Match Opponent 2 Pts
	</td>	
	 <td>Match Tie Pts
	</td>
	 <td>Match NoRslt Pts
	</td>
	</tr>

	<tr>
	<td>${match.matchNo}
	</td>
	<td>${match.matchLocation}
	</td>	
	<td><fmt:timeZone value="US/Pacific"><fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss" value="${match.matchDateTime}" /></fmt:timeZone>
	</td>
	<td>${match.eventId}
	</td>
	<td>${match.matchOpponent1}
	</td>
	<td>${match.matchOpponentPts1}
	</td>	
	<td>${match.matchOpponent2}
	</td>
	<td>${match.matchOpponentPts2}
	</td>
	<td>${match.matchTiePts}
	</td>
	<td>${match.matchNoResultPts}
	</td>				
	</tr>


	</table>
	
		<form:form modelAttribute="matchResultForm" action="updateResult" method="post">
		  	<fieldset>		
				<legend>Match Winner Fields</legend>
					<form:select path="result">
					
					<form:option value="${match.matchOpponent1}" itemLabel="matchOpponent1" />
					<form:option value="${match.matchOpponent2}" itemLabel="matchOpponent2" />
					<form:option value="TIE" itemLabel="TIE" />
					<form:option value="NRS" itemLabel="NO RESULT" />
					</form:select>
				<p>	<form:hidden path="eventId"/>
				<form:hidden path="matchId"/>
					<input type="submit" />
				</p>
			</fieldset>
		</form:form>	
	</div>
	<hr>	
</div>
</body>
</html>